<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="ysh">
        <input type="text" @keyup.20="fn">
        <p v-show="flag">当前大写模式</p>
    </div>
</body>
<script>
    new Vue({
        el:'#ysh',
        data:{
            flag:false
        },
        methods: {
            fn(){
                this.flag=!this.flag
            }
        },
    })
</script>

</html>